<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        let arr=[1,2,3,4,5,6];
        let a=[...arr];//a相当于arr
        console.log(a);
        let b=a;
        a[2]=100;
        console.log(b[2]);
        let c=[...a,...arr];
        console.log(c.length);
        let [first,...rest]=[...arr];
        console.log(rest[2]);
        a.copyWithin(0,2,-2);
        console.log(a);
        let fr=[2,2,3,12,5,6].findIndex(function(v){
            return v>3;
        })
    </script>
</body>
</html>
